from django.conf.urls import url
from . import views
from django.views.generic import RedirectView

app_name = "automation"
urlpatterns = [
    url(r'^index/automation/yaml-editor/$', views.yamleditor, name="yamleditor"),
    url(r'^index/automation/yaml-keys/$', views.yamlkeys, name="yamlkeys"),
    url(r'^index/automation/yaml-hosts/$', views.yamlhosts, name="yamlhosts"),
    url(r'^index/automation/yaml-perform/$', views.yamlperform, name="yamlperform"),

    url(r'lib/ztree.js$', RedirectView.as_view(url='/static/lib/ztree.js')),
    url(r'lib/jquery.ztree.core.js$', RedirectView.as_view(url='/static/lib/jquery.ztree.core.js')),
    url(r'lib/jquery.ztree.excheck.js$', RedirectView.as_view(url='/static/lib/jquery.ztree.excheck.js')),
    url(r'lib/jquery.ztree.exedit.js$', RedirectView.as_view(url='/static/lib/jquery.ztree.exedit.js')),
    url(r'lib/jquery.ztree.exhide.js$', RedirectView.as_view(url='/static/lib/jquery.ztree.exhide.js')),
    url(r'^yaml-del/$', views.alldel, name="alldel"),
    url(r'^yaml-dis/$', views.alldis, name="alldis"),
    url(r'^yaml-write/$', views.yamlwrite, name="yamlwrite"),
    url(r'^yaml-read/$', views.yamlread, name="yamlread"),
    url(r'^ansible-rules/$', views.ansible_rules, name="ansible_rules"),
    url(r'^yaml-add-key/$', views.yamladdkey, name="yamladdkey"),
    url(r'^yaml-add-host/$', views.yamladdhost, name="yamladdhost"),
    url(r'^yaml-add-group/$', views.yamladdgroup, name="yamladdgroup"),
    url(r'^yaml-mod-group/$', views.yamlmodgroup, name="yamlmodgroup"),
    url(r'^yaml-start-perform/$', views.startperform, name="startperform"),
    url(r'^upload/$', views.upload, name="upload"),
    url(r'^rules-modify', views.rulesmodify, name="rulesmodify"),
    url(r'^rules-content-check', views.rulescontentck, name="rulescontentck"),
    url(r'^rules-content-modify', views.rulescontentmod, name="rulescontentmod"),
    url(r'yaml-history', views.yamlhistory, name="yamlhistory")
]